#pragma once

#include "core/base_entity.h"
#include "../common/definition.h"

class GameEntity : public BaseEntity
{
public:
    GameEntity()
		:_direction(DirectionType::DOWN)
		,_action(ActionType::WAIT)
		,_speed(0.0f)
		,_canAttack(false)
	{
	}
	virtual ~GameEntity() {}
    virtual void run(long tick) {}
    virtual void render(long tick) {}

	virtual void setDirection(DirectionType direction) { _direction = direction; }
	virtual void setAction(ActionType action) { _action = action; }
	virtual void setSpeed(float speed) { _speed = speed; }
	virtual void canAttack(bool attack) { _canAttack = attack; }

	virtual DirectionType getDirection() { return _direction; }
    virtual ActionType getAction() { return _action; }
    virtual float getSpeed() { return _speed; }
    virtual bool canAttack() { return _canAttack; } 

protected:
    DirectionType _direction;
    ActionType _action;
    float _speed;
    bool _canAttack;
};